#include <QMutex>
#include "value-list-result.h"

ValueListResult::ValueListResult(QObject *parent) :
    AbstractResult(parent)
{
}

QVariantList ValueListResult::valueList() const
{
    QMutexLocker lock(m_mutex);
    return m_valueList;
}

void ValueListResult::setValueList (const QVariantList &valueList)
{
    QMutexLocker lock(m_mutex);
    m_valueList = valueList;
    emitResultReady();
}

void ValueListResult::emitResultReady()
{
    QMutexLocker lock(m_mutex);
    QMetaObject::invokeMethod(this, "resultReady", Qt::QueuedConnection, Q_ARG(ValueListResult*, this));
}
